<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>数据交易登录系统</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css">
    <style>
        /* 统一背景色（与其他界面一致的线性渐变） */
        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            /* 替换为统一的线性渐变背景 */
            background: linear-gradient(135deg, #003366 0%, #0099cc 30%, #66ccff 70%, #99ffff 100%);
            animation: fadeIn 1s ease;
        }

       .login-container {
            background-color: white;
            border-radius: 12px; /* 增大圆角与其他界面统一 */
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1); /* 增强阴影效果 */
            padding: 40px; /* 增加内边距 */
            width: 400px;
            animation: slideIn 0.5s ease;
        }

       .login-container h2 {
            text-align: center;
            margin-bottom: 30px;
            color: #007bff;
        }

       .form-group {
            margin-bottom: 25px; /* 增大间距 */
        }

       .form-group label {
            display: block;
            margin-bottom: 8px;
            color: #333;
            font-weight: 500;
            font-size: 16px; /* 增大字体 */
        }

       .form-group input {
            width: 100%;
            padding: 12px; /* 增大内边距 */
            border: 1px solid #e0e6ed;
            border-radius: 6px; /* 增大圆角 */
            font-size: 15px;
        }

       .form-group input:focus {
            outline: none;
            border-color: #007bff;
            box-shadow: 0 0 0 0.3rem rgba(0, 123, 255, 0.15);
        }

       .login-button {
            width: 100%;
            padding: 14px; /* 增大按钮尺寸 */
            background-color: #007bff;
            color: white;
            border: none;
            border-radius: 6px; /* 增大圆角 */
            font-size: 16px;
            font-weight: 600;
            transition: background-color 0.2s ease;
        }

       .login-button:hover {
            background-color: #0056b3;
        }

       .register-link {
            text-align: center;
            margin-top: 20px;
            font-size: 15px;
        }

       .register-link a {
            color: #007bff;
            text-decoration: none;
            font-weight: 500;
            transition: color 0.2s ease;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
            }
            to {
                opacity: 1;
            }
        }

        @keyframes slideIn {
            from {
                transform: translateY(-30px);
                opacity: 0;
            }
            to {
                transform: translateY(0);
                opacity: 1;
            }
        }
    </style>
</head>

<body>
    <div class="login-container">
        <h2>数据交易登录系统</h2>
        <form action="{% url 'login' %}" method="post">
            {% csrf_token %}
            <div class="form-group">
                <label for="phone_number">电话号码：</label>
                <input type="text" id="phone_number" name="phone_number" required>
            </div>
            <div class="form-group">
                <label for="password">密码：</label>
                <input type="password" id="password" name="password" required>
            </div>
            <button type="submit" class="login-button">登录</button>
            <div class="register-link">
                <a href="{% url 'register' %}">没有注册？立即注册</a>
            </div>
            {% if messages %}
            <div class="mt-4 text-red-500">
                {% for message in messages %}
                <div>{{ message }}</div>
                {% endfor %}
            </div>
            {% endif %}
        </form>
    </div>
</body>

</html>